package com.lijing.ThreadedBinaryTree;

import javafx.scene.transform.Rotate;

/**
 * @Description test
 * @title: InfixOrderThreadedBinaryTreeDemo
 * @Author LiJing
 * @Date: 2021/2/199:16 上午
 * @Version 1.0
 */
public class ThreadedBinaryTreeDemo {
    public static void main(String[] args) {
        HeroNode root = new HeroNode(1,"l1");
        HeroNode node2 = new HeroNode(3,"l2");
        HeroNode node3 = new HeroNode(6,"l3");
        HeroNode node4 = new HeroNode(8,"l4");
        HeroNode node5 = new HeroNode(10,"l5");
        HeroNode node6 = new com.lijing.ThreadedBinaryTree.HeroNode(14,"l6");

        root.setLeft(node2);
        root.setRight(node3);
        node2.setLeft(node4);
        node2.setRight(node5);
        node3.setLeft(node6);

//        InfixOrderThreadedBinaryTree infixTree = new InfixOrderThreadedBinaryTree(root);
//        infixTree.infixThreadedNodes();
//        infixTree.infixOrderThreadedList(root);

        PostOrderThreadedBinaryTree potbr = new PostOrderThreadedBinaryTree(root);
        potbr.postOrderThreadedNodes();
        System.out.println(node4.getLeft());
        System.out.println(node4.getRight());
        System.out.println(node5.getLeft());
        System.out.println(node5.getRight());
        //potbr.postOrderList();




    }
}